package com.cskaoyan.user.dto;

import com.cskaoyan.mall.commons.exception.ValidateException;
import com.cskaoyan.mall.commons.result.AbstractRequest;
import com.cskaoyan.user.constants.UserRetCode;
import lombok.Data;

/**
 * @Date 2022-12-03 09:34
 * @Created by yepq2025@outlook.com
 */
@Data
public class AddressListRequest extends AbstractRequest {
    private Long userId;

    /*
         参数校验
     */
    @Override
    public void requestCheck() {
        if(userId==null){
            throw new ValidateException (
                    UserRetCode.REQUEST_CHECK_FAILURE.getCode(),
                    UserRetCode.REQUEST_CHECK_FAILURE.getMessage());
        }
    }
}
